<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../../CSS/reset.css">
    <link rel="stylesheet" href="../2023-02-19/fontAwesome/css/all.css">
    <link rel="stylesheet" href="../2023-02-19/iconfont/iconfont.css">
    <style>
        body {
            font: 12px/1.5 Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
            /* 字体颜色不要在body里面设置 */
        }

        /* 设置外部容器样式 */
        .top-bar-wapper {
            background-color: #ccc;
            width: 100%;
            height: 30px;
            line-height: 30px;
            border-bottom: 1px solid #ddd;
        }

        /* 设置内部容器样式 */
        .top-bar {
            /* 居中宽度定下来 */
            width: 1190px;
            margin: 0 auto;
        }

        .top-bar a:hover,
        .top-bar .highlight {
            color: #f10215;
        }

        /* 设置字体效果 */
        .top-bar a,
        .top-bar span,
        .top-bar i {
            color: #999;
            text-decoration: none;
        }

        .location {
            float: left;
        }

        .location .fa-solid {
            color: #ec1c31;
        }

        .location .city-list {
            width: 320px;
            height: 436px;
            background-color: #fff;
            border: 1px solid rgb(204, 204, 204);
            /* 下拉框刚开始默认隐藏 */
            display: none;
            /* overflow: hidden; x */
            /* 设置绝对定位，使其不占据页面位置 */
            position: absolute;
            top: 31px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
        }
        
        /* 设置鼠标悬浮在location上时,显示city-list */
        .location:hover .city-list {
            display: block;
            
     
        }
       
        .current-city {
            padding: 0 10px;
            border-bottom: 2px;
            /* background-color: rgb(230, 52, 52); */
            position: relative;
            z-index: 10;
        }

        /* 设置curreny-city鼠标移入效果 */
        .current-city:hover {
            background-color: white;
            border: 1px solid rgb(166, 162, 162);
            border-bottom: none;
            /* box-sizing: content-box; */
        }
        .shortcut {
            float: right;
        }

        /* 设置分割线 */
        .shortcut .line {
            width: 1px;
            height: 10px;
            background-color: #999;
            margin: 10px 10px;
        }

        .shortcut .fa-solid {
            margin: 0px 4px;
            font-size: 1px;
        }



        /* 高度塌陷问题 */
        .clearfix::before,
        .clearfix::after {
            /* 在元素前面写空内容 */
            content: '';
            display: table;
            clear: both;
        }



        li {
            color: #999;
            float: left;
        }

        a {
            /* padding: 0 10px; */

        }
    </style>
</head>

<body>
    <!-- 外围容器 -->
    <div class="top-bar-wapper">
        <!-- top-bar塌陷 -->
        <div class="top-bar clearfix">
            <!-- 左侧菜单栏 -->
            <div class="location">
                <div class="current-city">
                    <i class="fa-solid fa-location-dot"></i>
                    <a href="#">湖北</a>
                </div>

                <!-- 设置城市列表 -->
                <div class="city-list">

                </div>
            </div>

            <!-- 右侧菜单栏 -->
            <ul class="shortcut">
                <li>
                    <a href="#">你好,请登录</a>
                    <a class="highlight" href="#">免费注册</a>
                    <!-- 分割条 -->
                </li>
                <li class="line"></li>
                <li>
                    <a href="#">我的订单</a>
                </li>
                <li>我的京东
                    <!-- 下三角 -->
                    <i class="fa-solid fa-angle-down"></i>
                </li>
                <li class="line"></li>
                <li class="highlight">企业采购
                    <i class="fa-solid fa-angle-down"></i>
                </li>
                <li class="line"></li>
                <li>商家服务
                    <i class="fa-solid fa-angle-down"></i>
                </li>
                <li class="line"></li>
                <li>网站导航
                    <i class="fa-solid fa-angle-down"></i>
                </li>
                <li class="line"></li>
                <li><a href="#">手机京东</a></li>
                <li class="line"></li>
                <li><a href="#">网络无障碍</a></li>
            </ul>
        </div>
    </div>
</body>

</html>